//
//  AdPageViewController.swift
//  funcode
//
//  Created by Wan Jiading on 2017/6/12.
//  Copyright © 2017年 WanJiading. All rights reserved.
//	广告页

import UIKit

class AdPageViewController: UIViewController, ProgressViewControllerDelegate {

	var progressViewController: ProgressViewController!
	
    override func viewDidLoad() {
        super.viewDidLoad()

		setupControls()
    }
	
	func setupControls() {
		progressViewController = UIStoryboard(name: "Progress", bundle: nil).instantiateInitialViewController()! as! ProgressViewController
		progressViewController.delegate = self
		progressViewController.totalTime = 5.0
		
		self.addChildViewController(progressViewController)
		self.view.addSubview(progressViewController.view)
		progressViewController.view.frame = self.view.bounds
	}
	
	

	func progressButtonDidClick(_ progressViewController: ProgressViewController) {
		DebugLog("点击了 进度条")
		
	}
	
	func backgroundDidClick(_ progressViewController: ProgressViewController) {
		DebugLog("点击了 背景图")
		
	}
	
}
